using Microsoft.Practices.Unity;
using System.Web.Http;
using Unity.WebApi;
using Microsoft.Practices.Unity.Configuration;
using System.Configuration;

namespace ExcellentProject.WebApiServices
{
    public static class UnityConfig
    {
        public static void RegisterComponents()
        {
			var container = new UnityContainer();

            var configSection = ConfigurationManager.GetSection("unity") as UnityConfigurationSection;

            configSection.Configure(container);
            GlobalConfiguration.Configuration.DependencyResolver = new UnityDependencyResolver(container);
        }
    }
}